<?php
namespace llkphp\workerman\process\http\think\resetters;

use think\App;
use llkphp\workerman\process\http\concerns\ModifyProperty;
use llkphp\workerman\process\http\think\contract\ResetterInterface;
use llkphp\workerman\process\http\think\Sandbox;

class ResetEvent implements ResetterInterface
{
    use ModifyProperty;

    public function handle(App $app, Sandbox $sandbox)
    {
        $event = clone $sandbox->getEvent();
        $this->modifyProperty($event, $app);
        $app->instance('event', $event);

        return $app;
    }
}